#为每一个测试文件创建可执行文件
cmake_minimum_required(VERSION 3.41)

set(CMAKE_BUILD_TYPE release)

project(demo)

set(CMAKE_CXX_STANDARD 20)

file(GLOB_RECURSE TEST_FILES CONFIGURE_DEPENDS
        "*.cpp"
    LIST_DIRECTORIES false
)

foreach(test_file ${TEST_FILES})
    get_filename_component(program_name ${test_file} NAME_WE)
    add_executable(${program_name} ${test_file})
endforeach()
